package com.yonyou.cyxdms.sysAuth.service.feign.dto;

import com.yonyou.cyx.framework.bean.entity.base.BasePO;
import com.yonyou.cyx.function.utils.bean.BeanMapperUtil;
import com.yonyou.cyx.function.utils.jsonserializer.JSONUtil;
import com.yonyou.cyxdms.framework.bean.dto.base.DMSBaseDTO;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import java.io.Serializable;

/**
 * <p>
 * 用户/客服信息
 * </p>
 *
 * @author zhangsx
 * @since 2018-09-26
 */
@ApiModel("用户/客服信息")
public class UserInfoDTO extends DMSBaseDTO implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 用户ID
     */
    @ApiModelProperty(value = "用户ID")
    private Long userId;

    /**
     * 用户在user库中的ID
     */
    @ApiModelProperty(value = "userToken用户在user中的ID")
    private String userToken;
    /**
     * 用户姓名
     */
    @ApiModelProperty(value = "用户姓名")
    private String userName;
    /**
     * 用户头像
     */
    @ApiModelProperty(value = "用户头像")
    private String userPic;
    /**
     * 微信小程序使用
     */
    @ApiModelProperty(value = "微信小程序使用")
    private String openId;
    /**
     * 融云token
     */
    @ApiModelProperty(value = "融云token")
    private String rongToken;

    @ApiModelProperty(hidden = true)
    private Integer vip;
    /**
     * 是否禁言 0 否 1是
     */
    @ApiModelProperty(hidden = true)
    private Integer isStop;
    /**
     * 是否屏蔽 0 否 1是
     */
    @ApiModelProperty(hidden = true)
    private Integer isShielded;

    private String createdTime;

    private String updatedTime;
    /**
     * 逻辑删除 0 未删除 1已删除
     */
    @ApiModelProperty(value = "逻辑删除标记", allowableValues = "0,1")
    private Integer isDeleted;
    /**
     * 经销商代码
     */
    @ApiModelProperty(value = "经销商代码", required = true)
    private String dealerCode;
    /**
     * 经销商ID
     */
    @ApiModelProperty(value = "经销商ID", required = true)
    private Long dealerId;
    /**
     * 经销商ID
     */
    @ApiModelProperty(value = "经销商名称", required = true)
    private String dealerName;
    /**
     * 车厂代码
     */
    @ApiModelProperty(value = "车厂代码", required = true)
    private String appId;
    @ApiModelProperty(hidden = true)
    private String createdBy;
    @ApiModelProperty(hidden = true)
    private String updatedBy;
    @ApiModelProperty(hidden = true)
    private Integer recordVersion;

    /**
     * 融云Key
     */
    @ApiModelProperty(value = "融云Key,用作返回", required = true)
    private String rongKey;

    /**
     * 手机号
     */
    @ApiModelProperty(value = "手机号", required = true)
    private String phone;

    /**
     * 登陆账号
     */
    @ApiModelProperty(value = "登陆账号", required = true)
    private String userCode;

    /**
     * 员工编号
     */
    @ApiModelProperty(value = "员工编号", required = false)
    private String employeeNo;

    /**
     * 分组ID
     */
    @ApiModelProperty(value = "分组ID", required = false)
    private String groupId;

    /**
     * 经销商地址
     */
    @ApiModelProperty(value = "经销商地址", required = false)
    private String address;

    /**
     * 经纬度
     */
    @ApiModelProperty(value = "经纬度", required = false)
    private String longitude;

    /**
     * 经纬度
     */
    @ApiModelProperty(value = "经纬度", required = false)
    private String latitude;

    public UserInfoDTO() {
        super();
    }


    public String getRongKey() {
        return rongKey;
    }

    public void setRongKey(String rongKey) {
        this.rongKey = rongKey;
    }

    public Long getUserId() {
        return userId;
    }

    public void setUserId(Long userId) {
        this.userId = userId;
    }

    public String getUserToken() {
        return userToken;
    }


    public void setUserToken(String userToken) {
        this.userToken = userToken;
    }


    public String getUserName() {
        return userName;
    }


    public void setUserName(String userName) {
        this.userName = userName;
    }


    public String getUserPic() {
        return userPic;
    }


    public void setUserPic(String userPic) {
        this.userPic = userPic;
    }


    public String getOpenId() {
        return openId;
    }


    public void setOpenId(String openId) {
        this.openId = openId;
    }


    public String getRongToken() {
        return rongToken;
    }


    public void setRongToken(String rongToken) {
        this.rongToken = rongToken;
    }


    public Integer getVip() {
        return vip;
    }


    public void setVip(Integer vip) {
        this.vip = vip;
    }


    public Integer getIsStop() {
        return isStop;
    }


    public void setIsStop(Integer isStop) {
        this.isStop = isStop;
    }


    public Integer getIsShielded() {
        return isShielded;
    }


    public void setIsShielded(Integer isShielded) {
        this.isShielded = isShielded;
    }


    public String getCreatedTime() {
        return createdTime;
    }


    public void setCreatedTime(String createdTime) {
        this.createdTime = createdTime;
    }


    public String getUpdatedTime() {
        return updatedTime;
    }


    public void setUpdatedTime(String updatedTime) {
        this.updatedTime = updatedTime;
    }

    public String getAppId() {
        return appId;
    }

    public void setAppId(String appId) {
        this.appId = appId;
    }

    public Integer getIsDeleted() {
        return isDeleted;
    }


    public void setIsDeleted(Integer isDeleted) {
        this.isDeleted = isDeleted;
    }


    public String getDealerCode() {
        return dealerCode;
    }


    public void setDealerCode(String dealerCode) {
        this.dealerCode = dealerCode;
    }


    public String getCreatedBy() {
        return createdBy;
    }


    public void setCreatedBy(String createdBy) {
        this.createdBy = createdBy;
    }


    public String getUpdatedBy() {
        return updatedBy;
    }


    public void setUpdatedBy(String updatedBy) {
        this.updatedBy = updatedBy;
    }


    public Integer getRecordVersion() {
        return recordVersion;
    }


    public void setRecordVersion(Integer recordVersion) {
        this.recordVersion = recordVersion;
    }

    public String getPhone() {
        return phone;
    }

    public UserInfoDTO setPhone(String phone) {
        this.phone = phone;
        return this;
    }

    public String getUserCode() {
        return userCode;
    }

    public UserInfoDTO setUserCode(String userCode) {
        this.userCode = userCode;
        return this;
    }

    public String getEmployeeNo() {
        return employeeNo;
    }

    public UserInfoDTO setEmployeeNo(String employeeNo) {
        this.employeeNo = employeeNo;
        return this;
    }

    public String getGroupId() {
        return groupId;
    }

    public void setGroupId(String groupId) {
        this.groupId = groupId;
    }

    public Long getDealerId() {
        return dealerId;
    }

    public void setDealerId(Long dealerId) {
        this.dealerId = dealerId;
    }

    public String getDealerName() {
        return dealerName;
    }

    public void setDealerName(String dealerName) {
        this.dealerName = dealerName;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public String getLongitude() {
        return longitude;
    }

    public void setLongitude(String longitude) {
        this.longitude = longitude;
    }

    public String getLatitude() {
        return latitude;
    }

    public void setLatitude(String latitude) {
        this.latitude = latitude;
    }

    @Override
    public String toString() {
        return JSONUtil.objectToJson(this);
    }

    /**
     * 将DTO 转换为PO
     * //对某个对象属性进行赋值
     * //BeanMapperUtil.populateValueByMethod(transPO,"setXxx",this.getXxx);
     *
     * @param poClass dto 需要转换的dto
     * @author zhangsx
     * @since 2018/7/22 0022
     */
    @Override
    public <T extends BasePO> T transDtoToPo(Class<T> poClass) {
        return super.transDtoToPo(poClass);
    }

    /**
     * po转化dto
     * BeanMapperUtil.populateValueByMethod(transPO,"setXxx",this.getXxx);
     *
     * @param po 需要转换的对象
     * @author zhangsx
     * @since 2018/7/22 0022
     */
    public <T extends BasePO> void transDtoToPo(T po) {
        BeanMapperUtil.copyProperties(this, po);
    }

}
